package eooeoe;

import java.util.Scanner;

class ArrayUtils{
	public static double findMax(double[] arr,int begin, int end){
		try{
			if(begin>=end)
				throw new IllegalArgumentException("begin:"+begin+">="+"end:"+end);
			if(begin<0)
				throw new IllegalArgumentException("begin:"+begin+"< 0");
			if(end>arr.length)
				throw new IllegalArgumentException("end:"+end+"> arr.length");
		}
		catch(IllegalArgumentException e){
			System.out.println(e);
		}
		return 0;
		
	}
}
public class qqqqqq {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		double[] a = new double[n];
		for(int i = 0;i<a.length;i++){
			a[i] = sc.nextInt();
		}
		while(sc.hasNext()){
			try{
				String str = sc.next();
				int b = Integer.parseInt(str);
				int c = Integer.parseInt(str);
				ArrayUtils.findMax(a,b,c);
			}
			catch(Exception e){
				System.out.println(e);
			}
		}
		try {
		     System.out.println(ArrayUtils.class.getDeclaredMethod("findMax", double[].class,int.class,int.class));
		} catch (Exception e1) {
		}
	}
}
